import request from "@/const/axios";

// 获取权限
export function getResourceFlag(jvsAppId, url) {
  return request({
    url: `/mgr/jvs-design/base/external/page/${jvsAppId}/permissions`,
    method: "get",
    params: {
      url: url
    }
  });
}

// 执行逻辑
export const ruleRun = (jvsAppId, ruleKey, data, headers) => {
  let tp = {
    url: `/mgr/jvs-design/app/use/${jvsAppId}/rule/run/${ruleKey}`,
    method: 'post',
    data: data
  }
  if(headers) {
    tp.headers = headers
  }
  return request(tp)
}
